package ezonsport.android.core.stepSystem;

import java.io.Serializable;
import java.util.Date;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * @author Administrator
 * 
 */
@DatabaseTable(tableName = "T_SportData")
public class SportData implements Serializable{
	@DatabaseField(generatedId = true)
	private long sportDataID; // ID，惟一
	@DatabaseField
	private long sensorID; // 传感器ID
	@DatabaseField
	private String sensorType; // 传感器类型
	@DatabaseField
	private Date collectTime;// 汇集时间：传感器每隔半小时汇集一次数据至手表
	@DatabaseField
	private Date synchroToPhoneTime;// 同步时间：手表存储的数据上传到手机
	@DatabaseField
	private Date synchroToWebTime;// 同步时间：手机上的数据上传至云端
	@DatabaseField
	private boolean isSynchroToWeb; // 是否同步

	// @DatabaseField(foreign = true)
	// private Watch watch;// 哪个手表汇集的运动记录

	public SportData() {
	}

	public long getSportDataID() {
		return sportDataID;
	}

	public void setSportDataID(long sportDataID) {
		this.sportDataID = sportDataID;
	}

	public long getSensorID() {
		return sensorID;
	}

	public void setSensorID(long sensorID) {
		this.sensorID = sensorID;
	}

	public String getSensorType() {
		return sensorType;
	}

	public void setSensorType(String sensorType) {
		this.sensorType = sensorType;
	}

	public Date getCollectTime() {
		return collectTime;
	}

	public void setCollectTime(Date collectTime) {
		this.collectTime = collectTime;
	}

	public Date getSynchroToPhoneTime() {
		return synchroToPhoneTime;
	}

	public void setSynchroToPhoneTime(Date synchroToPhoneTime) {
		this.synchroToPhoneTime = synchroToPhoneTime;
	}

	public Date getSynchroToWebTime() {
		return synchroToWebTime;
	}

	public void setSynchroToWebTime(Date synchroToWebTime) {
		this.synchroToWebTime = synchroToWebTime;
	}

	public boolean isSynchroToWeb() {
		return isSynchroToWeb;
	}

	public void setSynchroToWeb(boolean isSynchroToWeb) {
		this.isSynchroToWeb = isSynchroToWeb;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("SportData [sportDataID=");
		builder.append(sportDataID);
		builder.append(", sensorID=");
		builder.append(sensorID);
		builder.append(", sensorType=");
		builder.append(sensorType);
		builder.append(", collectTime=");
		builder.append(collectTime);
		builder.append(", synchroToPhoneTime=");
		builder.append(synchroToPhoneTime);
		builder.append(", synchroToWebTime=");
		builder.append(synchroToWebTime);
		builder.append(", isSynchroToWeb=");
		builder.append(isSynchroToWeb);
		builder.append("]");
		return builder.toString();
	}

}
